Skip to main content
This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal

Notes/Domino 6 and 7 Forum

Notes/Domino 6 and 7 Forum


  

PreviousPrevious NextNext

RE: Convert Multi-Value Field to JavaScript Array?
~Fred Xanjumimarakoi 21.Jan.04 02:30 PM a Web browser
Domino Designer 6.0.3 All Platforms


I have the code working, however, it seems to give me an "undefined" error at the line I marked:

Here is my code:
// Declare variables...
var doc = document.forms[0];
var docParentField;
var updateField;
var updateValue;
var stopProcessing;
var listPosition;
var listChoice;
var stepUser;
var formType;
var returnList = doc.returnToStepList;
var routeList = doc.routingToList;
var userList;
var userArray;

formType = doc.formType.value;

// Let's check to see what was chosen...
switch (formType){
case "Send Back" :
listChoice = getChoice(returnList);
listPosition = returnList.selectedIndex;
// Let's get the correct user to return to...
docParentField = eval("window.opener.document.forms[0].routingHistoryUser");
userList = docParentField.value;
userArray = userList.split(";");
// Check how many values are in the field...
if(userArray.length == 1) {
stepUser = userList;
}
else {
stepUser = userArray[listPosition].value;
}
// Update the fields on the parent doc...
updateField = "returnStep";
updateValue = listChoice;
alert("updateField: " + updateField);
alert("updateValue: " + updateValue);
docParentField = eval("window.opener.document.forms[0]." + updateField);
alert("got docParentField object");
********************************
*** ERROR ON THIS LINE *** docParentField.value = updateValue;
********************************
alert("set docParentField.value");
updateField = "returnStepUser";
updateValue = stepUser;
alert("updateField: " + updateField);
alert("updateValue: " + updateValue);
docParentField = eval("window.opener.document.forms[0]." + updateField);
docParentField.value = updateValue;
updateField = "closeAction";
updateValue = "Send Back";
alert("updateField: " + updateField);
alert("updateValue: " + updateValue);
docParentField = eval("window.opener.document.forms[0]." + updateField);
docParentField.value = updateValue;

break;

case "Route" :
listPosition = routeList.selectedIndex;
listChoice = routeList.options[listPosition].text;
updateField = "routeToChoice";
updateValue = listChoice;
openerSendTo = eval("window.opener.document.forms[0]." + updateField);
openerSendTo.value = updateValue;

break;

default :
self.close();
};
self.close();
Thanks again!
Dan




Convert Multi-Value Field to JavaSc... (~Fred Xanjumima... 16.Jan.04)
. . RE: Convert Multi-Value Field to Ja... (~Patti Dwoavitc... 16.Jan.04)
. . . . RE: Convert Multi-Value Field to Ja... (~Fred Xanjumima... 16.Jan.04)
. . . . . . RE: Convert Multi-Value Field to Ja... (~Justin Minlute... 16.Jan.04)
. . . . . . . . RE: Convert Multi-Value Field to Ja... (~Bill Frokimari... 18.Jan.04)
. . . . . . . . RE: Convert Multi-Value Field to Ja... (~Fred Xanjumima... 21.Jan.04)
. . . . . . . . . . RE: Convert Multi-Value Field to Ja... (~Justin Minlute... 21.Jan.04)


Document Options






  Document options
Print this pagePrint this page

Search this forum

Forum views and search


  Forum views and search
Date (threaded)
Date (flat)
With excerpt
Category
Platform
Release
Advanced search

Member Tools


RSS Feeds

 RSS feedsRSS
All forum posts RSS
All main topics RSS